import http from './http'
// 搜索接口 https://api-hmugo-web.itheima.net/api/public/v1/goods/qsearch
export const qsearchApi = (query)=>{
    return http({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/qsearch',
        method:'GET',
        params:{
            query
        }
    })
}
// 封装分类接口 https://api-hmugo-web.itheima.net/api/public/v1/categories
export const claApi = ()=>{
    return http({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/categories',
        method:'GET'
    })
}
// 封装详情接口 https://api-hmugo-web.itheima.net/api/public/v1/goods/detail
export const detailApi = (goods_id)=>{
    return http({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/detail',
        method:'GET',
        params:{
            goods_id
        }
    })
}
//封装商品列表 https://api-hmugo-web.itheima.net/api/public/v1/goods/search
export const goodsApi = (query)=>{
    return http({
        url:'https://api-hmugo-web.itheima.net/api/public/v1/goods/search',
        method:'GET',
        params:{
            query
        }
    })
}
